<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<#include "head.html">
<title>添加</title>
<style>
	textarea{
    		width: 100%;
    		height:700px;  
            min-height: 20px;  
            max-height: 300px;  
            _height: 120px;  
            margin-left: auto;  
            margin-right: auto;  
            padding: 3px;  
            outline: 0;  
            border: 1px solid #a0b3d6;  
            font-size: 12px;  
            line-height: 24px;  
            padding: 2px;  
            word-wrap: break-word;  
            overflow-x: hidden;  
            overflow-y: auto;  
            border-color: rgba(82, 168, 236, 0.8);  
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);  
  }
</style>
</head>
<body>
<article class="page-container">
	<form action="${contextPath}/douyinVideo/save.do" method="post" class="form form-horizontal" id="form">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">视频标题：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.videoTitle}" name="videoTitle">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">链接：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.url}" name="videoUrl">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">视频链接：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.videoUrl}" name="videoUrl">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">去水印链接：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.watermarkUrl}" name="watermarkUrl">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"> 去水印服务器链接：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.watermarkVideo}" name="watermarkVideo">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">作者抖音id：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.authorId}" name="authorId">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">作者头像：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.authorHeadImgUrl}" name="authorHeadImgUrl">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">作者名称：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.authorName}" name="authorName">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">扩展信息（json数据）：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<textarea  contenteditable="true" name="extendInfo" id="extendInfo">${entity.extendInfo}</textarea>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">创建时间：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" required value="${entity.createTime}" name="createTime">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
		<input type="hidden" value="${entity.id}" name="id">
	</form>
</article>

<#include "footer.html">

<!--请在下方写此页面业务相关的脚本--> 
<script type="text/javascript">
$(function(){
    $('.skin-minimal input').iCheck({
        checkboxClass: 'icheckbox-blue',
        radioClass: 'iradio-blue',
        increaseArea: '20%'
    })

	$("#form").validate({
		rules:{
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			var options = {  
					url:$("#form").attr("action"),
	                success: function() {
	                	layer.alert('操作成功', function(index){
	  	                	var index = parent.layer.getFrameIndex(window.name);
	  	        			parent.$("[name='refresh']").click();
	  	        			parent.layer.close(index);
	                	});    
	                	
	                }   
	        }; 
			$(form).ajaxSubmit(options);
		}
	});
});



var text = document.getElementById('extendInfo').innerText; //获取json格式内容
var result = JSON.stringify(JSON.parse(text), null, 2);//将字符串转换成json对象
document.getElementById('extendInfo').innerText= result ;

</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>